//1.导入vue-router包
import VueRouter from 'vue-router'

//导入对应的路由组件
import HomeContainer from '../components/tabbar/HomeContainer.vue'
import SearchContainer from '../components/tabbar/SearchContainer.vue'
import Shopcar from '../components/tabbar/ShopcarContainer.vue'
import VipContainer from '../components/tabbar/VipContainer.vue'
import newsList from '../components/news/newsList.vue'
import newsInfo from '../components/news/newsInfo.vue'
import photoList from '../components/photo/photoList.vue'
var router=new VueRouter({
    routes:[//请注意这是routes不是routers!!!
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/vip',component:VipContainer},
        {path:'/search',component:SearchContainer},
        {path:'/shopcar',component:Shopcar},
        {path:'/home/newsList',component:newsList},
        {path:'/home/newsInfo/:id',component:newsInfo},
        {path:'/home/photoList',component:photoList},
    ],
    linkActiveClass:'mui-active'//覆盖默认的路由高亮的类，默认的类叫router-link-active
});
export default router;